home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / tools / lu62 / novell / zproc.asm < prev   
Assembly Source File  |  1996-07-10  |  2KB  |  90 lines

  1. ;*********************************************************
  2. ;*                                                       *
  3. ;*                Int6f                                  *
  4. ;*                                                       *
  5. ;*  Function   : Setup user handler for 6fh interrupt.   *
  6. ;*  Input      : None.                                   *
  7. ;*  Output     : None.                                   *
  8. ;*                                                       *
  9. ;*  Last modifycation : 12/02/92 10:58pm.                *
  10. ;*                                                       *
  11. ;* CopyRight 1995. Nicholas Poljakov all rights reserved.*
  12. ;*                                                       *
  13. ;*********************************************************
  14. .MODEL TINY
  15. .DOSSEG
  16.  
  17. include c:\m61\include\dos.inc
  18. include c:\m61\include\macros.inc
  19.  
  20. EXTRN  int6f:PROC
  21.  
  22. PUBLIC zproc, OldInt6f, OffInt6f, SegInt6f, MyPSP
  23.  
  24. .CODE
  25. zproc     PROC
  26.           jmp  SetStart
  27.  
  28. OldInt6f  dd   ?
  29.           org  OldInt6f
  30. OffInt6f  dw   ?
  31. SegInt6f  dw   ?
  32. MyPSP     dw   0
  33. Dcl       db   'Interface miniPORT/IPX now is active.', 10,13,'$'
  34.  
  35. SetStart:
  36.           push es
  37.           mov  ax, 10h
  38.           mov  es, ax
  39.           les  bx, DWORD PTR es:[0bch]
  40.           mov  ax, es
  41.           pop  es
  42.           and  ax, bx
  43.           jz   SetHandler
  44.  
  45.           mov  ah, 33h
  46.           int  6fh
  47.           cmp  ax, 5555h
  48.           jne  SetHandler
  49.  
  50.           @Exit
  51. SetHandler:
  52.           push es
  53.           cli
  54. ;*
  55. ;*  Save Old Int6fh vector
  56. ;*
  57.           mov  ax, 10h
  58.           mov  es, ax
  59.           mov  ax, WORD PTR es:[0bch]  ; Old INT6f, offset
  60.           mov  OffInt6f, ax
  61.           mov  ax, WORD PTR es:[0beh]  ; Old INT6f, segment
  62.           mov  SegInt6f, ax
  63. ;*
  64. ;*  Set New Int6f value
  65. ;*
  66.           mov  ax, offset int6f
  67.           mov  WORD PTR es:[0bch], ax  ; INT6f, offset
  68.           mov  ax, cs
  69.           mov  WORD PTR es:[0beh], ax  ; INT6f, segment
  70.  
  71.           sti
  72.           pop  es
  73.  
  74.           mov  ax, es
  75.           mov  MyPSP, ax     ; set MyPSP value == ES
  76.  
  77.           push es
  78.           mov  ax, word ptr es:[2ch]
  79.           mov  es, ax
  80.           mov  ax, 4900h
  81.           int  21h           ; Free DOS environment
  82.           pop  es
  83.  
  84.       @ShowStr Dcl
  85.           mov  dx, offset SetStart + 1
  86.           int  27h
  87.  
  88. zproc     ENDP
  89.           END
  90.